import request from '@/utils/request'
import { objectToFormData } from '@/utils/form'

export function findSceneRangeList(params) {
  return request({
    url: '/51world/scene/src/range/findList',
    method: 'get',
    params:params
  })
}

export function saveSceneRange(params) {
  return request({
    url: '/51world/scene/src/range/save',
    method: 'post',
    data: objectToFormData(params)
  })
}

export function deleteSceneRange(params) {
  return request({
    url: '/51world/scene/src/range/deleteById',
    method: 'get',
    params:params
  })
}

export function saveCopyRanges(data) {
  return request({
    url: '/51world/scene/src/poi/saveCopyRanges',
    method: 'post',
    data
  })
}

export function findRanges(data) {
  return request({
    url: '/51world/scene/src/range/findRanges',
    method: 'get',
    params:data
  })
}

/**
 * 获取面
 * @param {Object} data
 */
export function getSceneRangeById(data) {
  return request({
    url: '/51world/scene/src/range/getById',
    method: 'get',
    params:data
  })
}
